/* eslint-disable no-undef */
/* eslint-disable no-sequences */
/* 包含多个接口请求函数模块
    函数的返回值是promise对象
[](#7发送短信验证码)<br/>
[](#8手机号验证码登陆)<br/>
[](#9根据会话获取用户信息)<br/>
[](#10用户登出)<br/>
*/
import ajax from './ajax'
// 1、根据经纬度获取位置详情](#1根据经纬度获取位置详情
// export const reqAddress = (geohash) => ajax(`/api/position/${geohash}`)
export const reqAddress = () => ajax(`address`)
// 2、获取食品分类列表](#2获取食品分类列表
export const reqFoodCategorys = () => ajax('index_category')
// 3、根据经纬度获取商铺列表](#3根据经纬度获取商铺列表
export const reqShops = () => ajax('/shops')
// 4、根据经纬度和关键字搜索商铺列
export const reqSearchShop = (geohash, keyword) => ajax('/search_shops', {geohash, keyword})
// 6、用户名密码登陆
export const reqPwdLogin = ({name, pwd, captcha}) => ajax('/login_pwd', {name, pwd, captcha}, 'POST')
// 7、发送短信验证码
export const reqSendCode = (phone) => ajax('/sendconde', {phone})
// 8、手机号验证码登陆
export const reqSmsLogin = ({phone, code}) => ajax('login_sms', {phone, code}, 'POST')
// 9、根据会话获取用户信息
export const reqUserInfo = () => ajax('/userinfo')
// 10、用户登出
export const reqLogout = () => ajax('logout')
// 11、获取商家信息
export const reqShopInfo = () => ajax('/shop_info')
// 12、获取商家评价
export const reqShopRatings = () => ajax('/shop_ratings')
// 13、获取商品
export const reqShopGoods = () => ajax('/shop_goods')
